/****************************************************************
 *This file is hitmc_sleep.c
 ****************************************************************/

#include "include.h"

/****************************************************************
 *This function is us_Delay function,
 *	(1) 微秒延时
 ****************************************************************/
int us_Delay(long uMicroSeconds) 
{
	usleep(uMicroSeconds);
	
	return 0;
}

/****************************************************************
 *This function is Delay function,
 *	(1) 秒演示
 ****************************************************************/
int Delay(double Seconds) 
{	
	unsigned int delay_us = 0;

    // 提前时间
	Seconds = Seconds * 1000000;
    delay_us = (unsigned int)Seconds;

	// 延时
	usleep(delay_us);

	return 0;
}
